summaryrefslogtreecommitdiff
path: root/src/game.cpp
blob: c2bbce4eb69280fff64c5afb2d0c8c810c86fcc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "game.h"

#include "functiondisplay.h"

Game::Game()
{
	addFunction( new FunctionDisplay() );
}

Game::~Game()
{
	for( FunctionHash::iterator i = hFunction.begin(); i; i++ )
	{
		delete (*i);
	}
	for( SituationHash::iterator i = hSituation.begin(); i; i++ )
	{
		delete (*i);
	}
}

Function *Game::getFunction( const Bu::String &sName )
{
	return hFunction.get( sName );
}

void Game::addFunction( Function *pFunc )
{
	hFunction.insert( pFunc->getName(), pFunc );
}